<template>
    <el-table :data="tableData" style="width: 100%">
      <el-table-column label="选择" width="55" ><template #default="scope">
        <el-checkbox v-model="scope.row.state" size="large" /></template>
      </el-table-column>
      <el-table-column label="编号" width="120">
        <template #default="scope">{{ scope.row.id }}</template>
      </el-table-column>
      <el-table-column label="待办事项" width="250">
        <template #default="scope">{{ scope.row.content }}</template>
      </el-table-column>
      <el-table-column label="创建时间" width="120">
        <template #default="scope">{{ scope.row.start }}</template>
      </el-table-column>
      <el-table-column label="完成时间" width="120">
        <template #default="scope">{{ scope.row.finish }}</template>
      </el-table-column>
    <el-table-column fixed="right" label="删除" min-width="120">
        <template #default="scope">
        <el-button
          link
          type="primary"
          size="small"
          @click.prevent="deleteRow(scope.$index)"
        >
          Remove
        </el-button>
      </template>
    </el-table-column>
    </el-table>
  </template>

  <script>
  export default {
    data() {
        return {
            tableData : [
                        {
                            id: '001',
                            content: '完成001',
                            start: '2024.10.29',
                            finish: '111',
                            state:false
                        },
                        {
                            id: '002',
                            content: '完成002',
                            start: '2024.10.29',
                            finish: '111',
                            state:false
                        },
                        {
                            id: '002',
                            content: '完成002',
                            start: '2024.10.29',
                            finish: '111',
                            state:false
                        },
                        ]
        }
    },
  }
  </script>